Added undo
Fix performance?