Rewrite using new khepri packages