Code tidy using JSHint