Cleaned up JavaScript a bit.
Merge pull request #12 from whatthejeff/js-cleanup

Cleaned up JavaScript a bit.