More protobuf refactoring.