Some structural changes for the codec