Refactored the MinkExtension integration for upstream changes