Factor out the state machine for hints.