Refactored negotiation in Template Module