Ok so to start off my car is a 2002 WRX with about 120,00 miles on it. about 10,000 miles ago I did the timing belt, transmission fluid, diff. fluid, plugs, fuel filter, and had the fuel pump checked. About 5000 miles ago i noticed that in 4th and 5th gear if I would accelerate there would be this surging as it was accelerating. Almost sounded like it was hitting the rev. limiter but then would keep going. I checked the plugs, and coil packs to make sure nothing was loose. The things that are done to the car is a catless up pipe for the turbos sake and catless open downpipe(However before the down pipe I was still having the issue). I have on some occasions immediately following a fill up throw a P0171 for Bank 1 too Lean, but after clearing the code it would not come back for multiple fill ups. Just to be sure I again changed the fuel filter and plugs and then also replaced the o2 sensor and MAF. After changing those this its new symptoms. 1st gear pulls strong with no issues on boost. In second it pulls good, but at around 4500 there is a very slight hesitation but nothing that is very pronounced. Now 3rd and 4th is where it gets interesting. Both have a lot of hesitation as it accelerates almost like boost is being cut. In 3rd boost is spiking to around 16 lbs which is really scary. At this point it makes me think it is the waste gate and it is not opening and and it is just sticking all over the place which causes the hesitation/surging feeling. In 4th gear however when it surges and it loses boost the sound is almost like its detonating, but it is very hard to tell. By far 4th gear is the worst feeling and I can't even make 7 pounds of boost. Obviously I cannot get a good 5th gear pull just for safety. I am hoping to check the waste gate, fuel sock and sending unit(was not able to do it before), leak down test, and hook up a good vacuum leak tester by putting pressure to the system. If anyone else has any ideas of what I should check or what it could be please let me know. I do not want to keep buying parts and never solve the issue. Thanks in advance for all your guys help.