cleaning out dead ends