Shuffling the backend code around a bit in preparation for multi-protocol
backends.