Fixup

Reorganised the files in an easier to grab-and-go fashion, included
more comments in the JS.