Updates JavaScript code to match community standards.
Reformats HTML to use 2 spaces indent.
Merge pull request #1 from jakubpawlowicz/master

Update to JavaScript and HTML to make sure it suits MAS coding standards