Added beginnings of encoding scheme