Partially refactor the Streams controller