Start refactoring network protocols