Added offset calibration. Closes #4