Refactored to loosen coupling of manager and comparer