Removed a bunch of memory allocations