a lot of fixes to the branch instructions.
My dumb ass changed 0x7ff to 0xff, changed a flagV to a flagZ by accident and also missed some paretheses while comparing booleans.