Moved apply definition into StateBasedSolver