More work on memory management.