Code cleanup

Removing old comments and unused code.
Code refactoring: movin cusom js code to own file