Renaming, added comments, minor code improvements

Renamed functions, parameters and variables; added some comments; some
small code improvements
Merge pull request #35 from jehope/msnJSMods12Dec2013-2

Renaming, added comments, minor code improvements