Added StreamThread,
including changes in files.