Fix to run under Meteor Blaze as well

Also, format according to JSHint and Meteor Style Guide