refactor js into separate named files, prepare for more OO
Merge pull request #20 from cuppajiu/refactor

refactor js into separate named files, prepare for more OO