Optimize API_MODE and BB_FREQ, TRACE pass.