use JSHint to clean the code
fix tests