Improve some memory usage