removed code from .html into .js

also removed some unneeded functions
removed code