removed calibration since its no longer necessary. cleaned up global variables.