Moved xml parsing, loadin and saving to here