stream_enum refactoring and improvements.