WIP: add QueryDialog
Some cleanup
Reorganize dialog types to dialogs/