Turned delete into ajax calls, added callback to destroy task history when task is destroyed