Refactoring protocols to support client plugability