Fixing JS and button template for 1.8 and using tabs to indent HTML for templates.