Removed some unnecessary allocations