Is that “pit bike” muffler any good? Got a link for that or is it common as dirt?
You found and fixed “a" problem or merely changed the gear ratio like WTR said, which was limiting your top speed.
If the bent sprocket were a real problem it would be throwing the chain or some such. That being said, a straight chain on straight sprockets does provide an edge on speed but not a whole lot. A bent sprocket and wobbling, vibrating chain represents a bit of power loss no doubt.