Mostly formatting/doc changes

Hi Adam,

Here are some nice changes for you, havent really changes much of the code. Just changed a bit of formatting, and added JSDoc blocks etc.

I could help you improve the code and stuff like that if you want, such as how your handling itterating over objects :)

Let me know if you want me to do that!!

I also dont know how you created the .min.js file, so you will have to do that yourself form the .js file changes :)

I would suggest you setup Grunt and get it to minify it with that, its actually reeealy easy :)

Thanks,
Tom