Refactor to allow for protocol groups.