Remove mutable state, introduce DeclaredSingletonType.
Update the spec.