Refactor with jshint