Made the morpher functional, added sorting algorithm.