refactoring app.rb and compile coffeescript