WIP on context processing algorithm.