Added set of minor bug fixes, and added code for infrastructure-based calibration.