Restructuring recentTasks