added strict and loose node removal. UNTESTED.