Extracted ConditionHelper and moved to API