Pull request with changes by Zearin plus some tweaks

Hey @balupton. I made this specifically a pull request because Zearin made some significant changes to the code standards and I want to make sure you don't disagree with anything. :)

Ignoring small changes and stuff like typos, names etc., do you see anything wrong with what @Zearin said? Mainly about reasons to use CoffeeScript instead of JS, so from around line 183 to line 207.

The rest I've checked and I believe is OK, but if you find anything point it out so I can fix it. :)