Add some comments to the Javascript code.
Cleanup the Javascript code, move all controllers into controllers.js,
and add further comments.