Refactor to not rely on a TrialFinder object