Refactored + generic dialog