Refactored XML Dialog inflater and XML dialog parsers.