removed unused code found with jshint