library cleanup revised