Refactored Constraints and Searcher.