Fix to run under Meteor Blaze as well

Also, format according to JSHint and Meteor Style Guide
Merge branch 'pr/6'
Merged dandv's pull request