Adds and deletes nodes