code cleanup, undo/redo now fully working, added events to change editor values