Make JSHint pass by modifying the code