7/8 Code review

General points:

- Need integration tests
- Need better test coverage in general
- Modularize all javascript with object literals -- there's way too much spagetti code in the global namespace