Refactoring according JSHint