More cleanup of code to support Linux proting