JSHint cleanup.
Add unit test infrastructure.