Small refactor to prepare for HMC inference.