Refactoring. Moved save file routines out to savefile.cpp.