Hey Guys,
I know its about 3 years late but heres the solution to the problem for any readers just loggin onto this thread.
The Pinging/backfiring/gunshot was caused by a combination of three things.
The crank angle sensor needed adjusting. (The it wasn't the main cause)
The spark plug gap needed putting down to .8 (again not the main culprit)
And there was a crack in the vacuum hose running to the wastegate.
So Boost was too high.
The Air flow meters are only good up to around 14psi. the boost was going over this and therefor the engine was running very lean, and thats why we were getting the massive backfire problems.
All sorted once the crack in the line was fixed.