This brings the second part of the streamer refactoring. I'm going to be doing frequent merges in the next little while to avoid big conflicts. Tested on x86_64. Diego.