Refactored and documented events. Fixes #39
Grunt build