Improved memory layout