Switch js to coffee