Removed extra code. Now there is an average_fitness attribute in the population class that keeps track of the average fitness of the population for every generation.