External class for loadandsave, more refactoring done