Have you ever noticed how each pipe design program gives you greatly varied designs? And they dont tell you upon which formulas or ideas they base their calculations on. So I developed a way to design pipes based on Blairs research paper and present it to you for your use and understanding. It is at
http://dragonfly75.com/motorbike/ECtheory.html
Since I believe that the perfect header length can only be found by trial and error I suggest pipe builders first measure the mid-header internal gas temperature at peak rpms (while riding), plug that into my Excel file, and use the suggested wave speed as a baseline to design the pipe. Then put the pipe on and test it with different header lengths, longer and shorter than what my Excel file recommends.
I have done extensive testing which led me to believe that the diffuser needs to start so that the beginning of its return wave comes back right around BDC at top rpm. Also the more focus you put on return wave strength from the diffuser coming from the beginning of the diffuser, the better it is for peak rpm power, whereas multi-cone diffusers are better for a broader range of power. And for the baffle a dual cone baffle is preferred for enduro riding whereas a triple cone baffle is for MX.
I also made a pipe with an adjustable stinger size and found out that smaller favors low rpm power, and larger favors high rpm power. Since there are different formulas available for stinger size and length I recommend a pipe builder experiment with different sizes to best fit the engine and the application.
All my testing so far has been with parallel-walled headers, not with expanding headers as MX bikes frequently have. I believe those headers increase baffle return wave strength but I need to start making and experimenting with them to find out for sure.