Integrate refactor changes into protobuf task