JSHints CanJS

Adds JSHint error detection to tests and includes corrected errors in the code base.