refactoring dialog+model+parser