Eliminated StateId in favor of using strings.
(They were only used for debugging and error reporting anyway.)