jshint refactor