Refactored Search and Server to use protobuf