Fix typo, comment and code style.
Update code for navigation.
Should fix #103 and, in part, #63.