Cleans up Linux implementation a bit.