Separated dialogs from main code, minor refactoring