minor test cleanup and other rand things.