Vastly simplify the Ecg class to avoid the array growth bug.