qualities: return vector of sorted frontierIDs instead of just best fontierID; fix bug in nextGoal; update processMap in order to handel sortedFrontierIDs