Memory management improvements.