Fix save and load of files with new accounting.
Fix typos/compilation errors.