Fixed navigation bar to properly activate link on location. Also refactored sources to make them more modular.