More refactoring...
Last bit of pre-testing refactoring!