Removed branches, added global buffer inversion