Hopefully finished debugging Undo and Clear buttons and interaction with other buttons.