All good advice here guys, but here is my take on the situation as an old guy who has been running 2 strokes since 1974:
1) It is an 8 year old used bike new to you. Leak test the engine to make sure the case, gaskets and crank seals are not leaking. You do this by plugging the intake with a bung at the carb mount and with an expanding rubber plug in the exhaust hole. You pump the engine up with 7psi and see if it holds it. If the engine is leaking air you will never get jetting right.
2) Drain the tank and put new gas/oil mix in. Buy an excellent brand of 2 stroke oil and stick with it. Mix it as to the instructions which are 50:1 for your bike. Sticking to known good components and manufacturer's procedures makes things MUCH MUCH easier to troubleshoot.
3) Follow the KTM manual for jetting for your altitude and temperature. These recommendations are on the rich side but will work and are safe and will get you running safely IF there are no case leaks. You checked this in #1) right?
4) Run it, warm it up gently, look for problems and leaks, solve them. Stick a new plug in it and run it up through the gears. Shut it off and pull the clutch at top speed, then pull the plug and look at it. This is called a plug chop. Learn to read the plug. This will tell you if the main jet is right. You may be able to lean it out a size or two for better performance.
5) Jetting pilot (idle) and needle are bit complicated to explain here but well worth doing for crisp response and engine life. Read up on it and learn it.
6) NOW stick your Doma pipe on. Jet rich a jet or two if you want and plug chop it again. You will be able to read if you are lean or rich on the main.
Make all mods one at a time and only to a known well working engine. Sticking to as close to manufacturer's specs assures the longest engine life and easiest trouble shooting. Stock these engines work well and long, learn to keep them running stock before you start experimenting, and then just change one thing at a time.
Here is a leak tester and a plug reading chart: