Some work on upgrading the spi stuff