Separating ecc logic into header and source files; commenting.