Reworked some bits to make less operations per second