Seems like a pretty big leap to engine rebuild...especially after the solonoid thing. Did you mean trans rebuild? Rough idling can be one of several things without warranting a rebuild. First few things off the top of my head would be intake gasket, FPR, plugs, vacuum leak (especially after r/r the intake), and O2 sensor.