refactoring using jshint and kendolint