Working on the codec mechanism