Fix concurrency issues. Add delete task support.