Cleaned up some code and added a few handy methods for the navigation system.