A more flexible hexToBin function.
Less duplicate code and read binary string function can read arbitrarily long data.
Removed bad comment.