Moved from js to coffee