Add stream transfer, memory leak and heap profiling metrics. Also, some fixes.