memory management imrovements