More refactoring and modularization.  Improvements to navbar.