Removed Spring IoC because it didn't appear to bring enough benefit for the performance expense (need to run on Raspberry Pi), and refactored.