at first blush I thought you did the correct thing, then I realized if you had gotten your speed and altitude and had escaped the windshear, then you should start to clean up.
so, what altitude and what airspeed were you ?
and when did you start cleaning up?
For example, if you were over 1000' agl and in a normal climb profile, maybe you should have started the flaps up.
So, we really need quite a bit more info.