StreamSource and Task updated to support new grouping api + refactored