QND cleanup script