More memory tidyup