SPI client refactoring and block read/write functions.