Improved memory management.