Added code to update autocomplete whenever a task is added or removed