Apparently the horizontal thing was what was causing the flying.
IDK what's causing the jittering though because I haven't been able to stop it
BTW the code I was offered didn't change shit and just resulted in a bunch of compiler errors