Start implementing a better calibration method.
Add beginnings of transform function.