Fixed some things + added remove_nodes and marking nodes for removal