Restyle JS code and set up JSHint