Keep jshint happy and removed unused code