Refactored to return the controller and matcher predicate in addition to the component itself.