Tricopter algorithm [HELP - CONFIRM]

I can't think of any sensible reason for having two PID instances for each degree of freedom.

I'd expect to see a PID for pitch, a PID for roll, some algorithm to control total vertical thrust, and a mixer function to combine the three control signals into three power demands for the three motors.