Setup automated tests for Travis

Fixed a couple things to get JSHint passing.