Update comments and indentation in HexString
Fix issue with length of byte array