revamped removeNode stuff; hopefully it all works now