Moved state out of package namespace into stream namespace