fix remove_nodes and change scope to 'html'