Abstract out Dialog Class. Fixes issue #73. Towards #74