delete repopulateCompletionData and restoreProgress as neither is actually used
optimise slightly crazy code in serialiseSaveState so that it's a) faster and b) more readable