Initial code for the new dialog system.