Fixed #111 -- move new_nodes out of conditional and delete nodes properly