improved remove-all functionality