Split into three states. Added more step types.