big cleanup of the stream manager, both implementation-wise and API-wise. also eliminated biggest sources of NullPointerExceptions