Have added comments/ cleaned up code and reorganised. There is now a calibration function as well as a clear calibration offset function. CAPITALS are for someone to help me with