Implemented undo functionality on the whiteboard.