renaming pages and refactoring javascript for active menu item