Refactor into files.