Removed code that assumed MSB of register byte decided read or write.  Also committed correct example sketch