State transitions are now being properly defined.