Added framework for priority algorithms