Add support for intermediary generic intermediary callback (close #16)