Implemented first version of state space reduction.