minor cleanups to contract-random-generate's API