Added erasing functionality, also undo/redo correctly working.
Fixed small bug while traslating when resizing.