Clean and organize stream collector for #489.