Add protobuf mode, and a few other customizations