Yet another encoding scheme cleanup