Restructured to cater for app.coffee file