Fitness evaluation needs to include klass.
Importing heapq library.