JSHint code fixes