Fixes navigation bug. Completely refactored code. Much cleaner. Thank goodness