Clean up the state definitions to match the spec