Fix problem with IO:All's autoclose causing the datastream handle to be
destroyed far too soon
Clean up old code that was commented out