Fixed IO definitions and state machine