Trying to reduce memory usage