Refactored Alfred interoperability into a generic module.