JSHint warnings corrected.