jshint test + code cleanup
fixed config for tests