close on exec code ... and some cleaning