fix issues when using minification

Current version doesn't work when using minication. This fixes all of the issues I found when using minification. I'm unsure how to modify your CoffeeScript file accordingly.