xtal_corr and freq_ofs added to correct for crystal offset