Clean ups and fixes to better utilize available heap memory