readline wrapper cleanup