move javascript to files. prepare to coffee