More efficient drawing and undo