Improved memory usage