What do you mean by "it only shifts smoothly going up in gears or down in gears"? What else is there? You mentioned ghost shifting in the title, so I assume you're getting some of that.anomaly said:
How badly is the derailleur bent inwards? New hangers on good frames are not always in alignment. The Park DAG-1 (derailleur alignment gauge) can be used not only to assess how badly the hanger is out of alignment, but can be used to bend it so that it is in alignment. This is one of the things that I check when my bike is not shifting properly. The other major culprit for bad shifting is dirty cable housing. If you haven't done so already, replace the cable housing too. (You mentioned that you had replaced the cables, but I'm unsure whether you also replaced the housing.)