Cleaned up a bit.

Chopped unnecessary dependencies (mostly database stuff), then cleaned up and refactored the javascript. Probably should have been two pull requests.