Moved to html5Mode navigation. Fixed minor bugs in JS code