look harder for args, don't hardcode names for pid 0 & 2, other cleanups