Detach Codec

put codec to separate module