Cleanup extension, rework getting cmdline and add more fields to darwin implementation