add tasks, categories and move tasks to base if the category is deleted