Removed unnecessary allocs/deallocs