wip. add button and popup dialog.

Dialog is a mess at the moment. needs more work.
Tidy up dialog.