Changed dialog factory to use DialogFragments