Complete the codec test framework
Fix errors