I refactored load and insert, there is no intentional change in functionality but it pulls out the code that is duplicated between them, makes sure they call the same things by the same names, and adds comments on some of the data structures.
I did this partly because I still was having difficulty understanding the complexity and also as a precursor to adding a generic Simple 3 level dict for storing some other data in (the unused Replaces tokens)
I refactored load and insert, there is no intentional change in functionality but it pulls out the code that is duplicated between them, makes sure they call the same things by the same names, and adds comments on some of the data structures.
I did this partly because I still was having difficulty understanding the complexity and also as a precursor to adding a generic Simple 3 level dict for storing some other data in (the unused Replaces tokens)