Some JSHint corrections
Merge conflicts