Refactore dialog interface