Optimization of memory

Optimization of memory