Undo functionality - Doesn't work yet, but framework is there