Start moving protocol-specific code to protocol.[ch]pp