Fix protobuf accessors.

Change-Id: I31b9ff6bb87e82685b782982eaf6dcaece505e44
Some minor TODOs done.

Change-Id: I1c9225f002ec4a84b84dfe2a9e0ae4161fc7aef7