re-jig memory layout and management