cleanups, comments, and nav type check