Bug fix on the readVoltage method

Fixed a problem with the readVoltage method and cleaned up the code in
the readRaw method.