Added StateStore class and test code.