Fixed the undo/clear functionality on the whiteboard and made it work smoothly without blinking.
Made cursor redrawn every time it is destroyed on undoing or clearing shapes.