javascript cleanup using JSHint