Attempts at fixing calibration issues

Not much progress. This is mostly small changes that don't really help.