some cleanup, separates stream classes on it's own files.