cleanup for streaming data into ring buffer. in progress.