Bug 1041205 - Fix style guide violations

This makes the JS/HTML code conform to the [Mozilla webdev style guide](http://mozweb.readthedocs.org/en/latest/js-style.html).