JSHint fixes and integration