e2 ApplyForce Stabilization Help

Im not sure if this is the right section to post help for e2 problems, so if not, then move this if you want.

Ok, so heres the e2…

@name fighter test
@inputs
@outputs
@persist
@trigger

runOnTick(1)
Temp=entity(),Entity=(Temp:getConstraints():count() >0 ? Temp:isWeldedTo() : Temp)

Angle=-Entity:angles()*15-Entity:angVel()*2
Center=Entity:massCenter(),Right=Entity:right(),Forward=Entity:forward(),Up=Entity:up()
Entity:applyForce((vec(0,0,18)-Entity:vel())*Entity:mass())
Leverage=Entity:inertia():length()

Entity:applyOffsetForce( Up Angle:pitch(),Center-ForwardLeverage)
Entity:applyOffsetForce(-Up Angle:pitch(),Center+ForwardLeverage)
Entity:applyOffsetForce( Up *Angle:roll() ,Center-Right *Leverage)
Entity:applyOffsetForce(-Up *Angle:roll() ,Center+Right Leverage)
#Entity:applyAngForce(Angle
Leverage) #This can replace the above 6 lines

The problem is: the sentence (Entity=(Temp:getConstraints():count() >0 ? Temp:isWeldedTo() : Temp) I dont need this part of the code because it causes the game to lag when I spawn the e2 on tremendously welded/parented contraptions. Is there anyway to get rid of that one code but still allow the e2 to work? Thanks.

P.S I did not make this code, as some of you may find out. I, assuming this was on the Gmod Wiki for all to find, downloaded it assuming that anyone was allowed to download the code if credit was given to the original creator (chinoto)