Added an encoding library that handles base16 (hex) and base32
Fixed some bugs in the hex encoder
Cleaned up base32 code