Generation, saving and loading are now complete. Some code cleaning is probably needed.