Add to_hex/1 and to_hex_string/1 functions