Changing the xml dialog and fixing minor errors