Refactor code

Refactored the code to move SPI initialization to main setup. Running
at slowest speed.