H-Bridge and PWM improvements/mistakes

The L293D is an old design and loses anything up to about 3V. So you only supplying the motors with about half your battery voltage which is probably why they don't run very well, particularly at low PWM rates.

But since you haven't told us what motors you're trying to use or how many of them or how anything other pins9 and 10 are connected it's just a guess.

Steve