PROBCORE-215 Cleaned up and refactored StateSpace as well as some of the evaluation stuff.