tidying up
add timeouts. Fix exotic double-deletion bug