Added hex encoder/decoder