Wrote capabilities negotiation framework.