Initial implementation of the dialog manager