Tested operation cache.
added function to find the common ancestor of two sorts.