Improvements in the fitness function