Modified API significantly

Added Codecs (encoder and decoder)