Large codebase refactor.