Added protobuf support for entities.