Moved javascript to coffee file