Fixed codec module s.t. unit tests are passing.