Refactoring... yay

Fixed dialogs