Removed unnecessary allocations in twosComplement call.