Extracting much of the code from the main program file to a number of classes with fewer responsibilities