Refactored main.coffee .