Modified validator to work with sorted list prereq
Modified profiler to work correctly for sorting