split script to main.coffee and main.js