Improved codec