Extract out parsing proto file logic from ProtobufGen

noted, compressed into one message