Slight tweaks to freqmod function.