can undo last added position
fix jshint errors