webif: cleanup client-side code using handlebars and make things look nicer