refactor: type casting cleanups