To be honest, that sample code is so poorly written that I didn't bother loading it.
The structure and style is non-existent - possibly written by a high school student to help his uncle.
If it works - it's because he kept trying, not because it was thought through with understanding!
Sorry - harsh, but you'd be a lot better off studying the concept, hardware, and understanding what you need to achieve - then spending a week to make it work!
Get one channel working - without any delays(), then spin that out into an array of channels.
Here's my old project - more complex than yours - but similar code.
72-channel PWM on 8MHz
(Only 8x3 (=24) channels shown)