Extract out parsing proto file logic from ProtobufGen

yay for list comprehension, made the change