some cleaning up
very simple undo system added