Separate main source file into a number of logical components.