Refactor so allprims.gs can be input interactively,
and add code for ProtoObject .