Move protobuf methods into separate utility class