Segregation of the codecs module. Several bug fixes.