Finite State Machine behavior for the C3 runtime.
Your welcome if you have any suggestions for improvement let me know.