Factored out unnecessary abstraction in the state subpackage.