More wiring of navigation. Fixed a few bugs