Those lines are needed because I effectively doubles the encoder resolution at some point by using pin change interrupt as well.

Those numbers are simply needed, as these are about the maximum speed the motors can travel, but to be honest the motor calibration routine is really not that important, as there has only been case in internal testing where it was needed, so I would recommend focusing on getting the rest of the stuff to work first.