I just bought my first WRX about a month ago. I have the problem listed below and started to read through forums about fixing it. I am a little confused on where to start. Any help or suggestions would be appreciated.

I have an 05 wrx with 90k miles on it. Last week I was on the freeway and noticed my odometer and speedometer were not working. I read through forums and saw that it could be a bad speed sensor. I drove the car a few times over the weekend and the CEL came on. So i stopped in and had the codes run. It came back with 2 P0519 codes. So now I'm not sure where to start. When the car is idling it is constantly jumping between 1000 and 1200 rpm. Also from what I have read the car is in limp mode. When I accelerate the car is very sluggish and unresponsive, almost like it is ready to stall out. Shifting through the gears is not as smooth as I remember either, and it's almost like I have to give it more gas to not stall.