Refactoring declarations betweent rest.go and backend.go
Protobuf message definitions.