Some memory improvals