Add headers and functions to SPI class

Note that changes don't work. Minor edits required