Refactor to multiple files.