Remove dependency on IORefs