fixed resize centering & added undo button
Undo and Clear now work

hacked together as usual