Refactors into several source files.