Does the bike have a removable d-hanger? I've had similar problems when the hanger was loose.
If the housings seem good, everything is tight, and no amount of adjustment seems to make it shift well, then it is reasonable to start replacing parts. If the derailleur checked out, then it could be the shifter. Is it sti? There are lots of little parts in those that can wear.