Added some buttons and redirects

Also template dir and some inlined js.