Added system dialog, refactored DialogManager.