You potentially add a middleman script, one that just did the same type of routing that your master script does, but then it routes to your individual applications (based on cdn, dnis, etc).
Once you do that, the next portion of scripts become secondary scripts, and the new routing script...