Some fixes in the edit window. Added export of variables to xml file.