Cleanup some of the streams code.