Moved custom javascript to separate file

Improved page navigation