More framework code in place, we have ourselves a state manager this time