Revise how the variable that holds the state is structured. Do the following:
- At initialization form a matrix that holds the state, and store variables necessary to map matrix back to dictionary.
- Only form the dictionary of states at points where the state is stored.