Moving helpful conversions to separate file