fixed jshint errors (removed redundant code)