Improved version of codecs and some example