Clean up some unnecessary destructuring and refactor `next_node`.