Undo and Complete implemented. Bug fixes