Refactors code into mutiple files.