Added undo option for freehand