Allow project to be run out of the box

- Enable Karma to run tests and give code coverage.
- Rearrange file hierarchy to allow tests, dev environment and prod
  environment to all run successfully.
- Comment the document.domain assignment to avoid DOM security exception on
  load.