Got rid of unnecessary memory allocation.