abstracted out the dialogs to make future additions better. Issue #131