Optimized memory usage (low memory footprint)