Saving data.xml + fixing categories retrieval