Backport Calc's data stream massive cleanup effort.

Change-Id: Ifbeb7c2d90d87a7cffe9a752f9e8b4910d55fcd9