Converted saving JS to coffee