minor cleanup
move js to separate file
Merge pull request #2 from HackBerkeley/pr-separate-js

Separate javascript file, minor cleanup