Move code into new files.