Updating interface: problem with encode/decode algorithm (unique_ptr wtf?)