Added undo, more tests