Split utility functions to separate file, incorporate rew_function and
run_condition into fit object, small fix for run-level fits.