SPI class now fully working