Add generics to Codecs