Nice attacker plotted for months and had accomplices