Moved style from js to css, bugfix

  * moved script tags to the end of body tag
  * easier interactions with handles
  * clean old tpl in html