Make jslint happy
refactoring