Updated threading for stream, updated waiting for parallel work to finish