Some JSHint warnings/errors fixed.