Added encoding/decoding of strings