Added some dialog functionality