Moved stuff from ttc_estimation into here as starting point.