Reducing memory footprint