Keep in mind I don't know your bike or carb.
If it makes you feel any better... my Honda will only idle for about 10 seconds when hot... so I give it a little 'goose' every 10 secs or so... If I turn the idle up much more it starts to engage the tranny at idle when cold... I don't like that so I just leave it as is.
but if yours won't idle hot or cold... it doesn't seem right... I imagine you have already adjusted BOTH idle mixture AND speed screws?.. (if it has both?)
I doubt its ign timing or piston/rings if it runs good at mid-range and higher speeds.
On the 40mph... If your cylinder and head are stock you could have the typical 2 stroke mods done to them.
You'd gain maybe 5mph... with the same low end.
(I could do it if you wanted).
I am about at the same point with mine... I hope further changes don't make the low end weaker.. (the faster you go... eventually they will)