added more clean codes + jshint tested code