Add code for dealing with specific Stream sources

(currently commented out as it decreased performance a bit)