My lil' solution

Oh so simple. Skips the dummy encodings since there seems to be little point in handling them.