Lot of changes! Added SPI protocol and fixed a bunch of bugs.