tidying negotiation a little, inlining matches and removing APs