Memory usage optimized.