Refactor the example code a bit

Improve readability.
Make decoder map a public property

It is used by the encoder to make an inverse map. (Possibly refactor
this).

Also, renamed that property to rawMap because it is a property on the
decodeMap already.
Added an EncodeMap and an Encoder

Encoder is not functional, but there so I can add more tests.