Minor memory allocation tweaks