Eliminated protocol.cpp's dependence on main.