Decode handles tokens. Encode checks token length.

Fix for issue 3.

Decode now actually decodes the tokens.
Encode now checks to make sure tokens are of length 0-8. If it is too long, it is truncated.