Tricky cleanup script, some figuring to do yet