remove micro optimization and simplify HexStringToBytes