splits context into two sub-classes for serialzation/deserialization