Started unifying code for BER computations