Correct XML output to keep track of an enitre generation. I added a generation class and modified XML IO function.