Moving server-side code to coffee