Cleaned up javascript code

- Cleaned up unnecessary white-space.
- Deleted comments