Refactored coffeescript
Fixed a publish error