Started splitting up code to make it more modular.  Right now I have split it up into 7 files, each containing functions specific to a certain device or set of tasks essential to the lock system (ra8875, stmpe610, flash memory access, actuator control, SPI interface)