Convert app from js to coffee