Refactoring explosion out into headers and impl files. Builds, untested