Features/protobuf output

This is ready for review