Fix draw

Add undo and redo button
Put dialog box in a ko binding
Clean code