fixed typo in constants.coffee and corrected some code in helpers.coffee