Changes in spi and timer, some with debug