Finish advanced query mode. Added dialogs.