Added more tests. Now code coverage is 100%. Fixed a couple of minor bugs. Jshint errors are all fixed.