Changed the port and pin numbers to #defines, also commented out the PWM frequency increase as it seemed to be providing inaccurate motor power
Super optimised encoder reading that uses XOR. :)