Many functions/methods are way too long and very hard to follow. For example, `run` in `run_calibration.py` is over 1400 lines long. We should introduce new functions or even new modules (e.g. #64) to take over some of the functionality.