Many changes to tpls and js

Didn't have get hub open while changing files, so I have to upload all
of it.