[0.2.4] Clean up code to pass JSHint