Start of refactor to add a DataStream class and use it.