Converted remove_task to use streams