Add phases
Rename state to phase
Add C08 validation