Refactored coffeescripts