Clean up CP state machine and supporting code