Add logical and class matcher factory