2004 elantra GT revving itself and stalling

OK, about 80k on this car, and other than the notorius elantra headlight issues, this is the first problem i've had... It will rev itself, especially when I come to a complete stop, sometimes
intermittently when at rest, anywhere from 1100 rpm all the way to 3000 rpm-- a tap of the accelerator usually straightens it out...
what does everyone think? O2 sensor? If so, how do I change it? I'm not an automotive idiot, just don't get under the hood of newer vehicles often (I have 3 ice cream trucks, all 70's era chevy panel trucks)--- but I need to get the Hyundai running right, and want to do it as cheaply as possible...
Thanks in advance folks.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
snipped-for-privacy@gmail.com wrote:

be a stickly throttle plate. Have you opened the throttle body and looked to see if there's any accumulation of oil on/around it? This can be caused by the crankcase gases coming from the PCV. If it's dirty, a little carburetor cleaner should take care of it.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
It was the throttle plate... i made the mistake of not changing my own oil about 30k miles ago, went to a 15 min place, and the air filter was due for replacement, and pretty dirty, so I just let them throw it in (I know, overpaying for the easy stuff is fun sometimes though)--- but anyway, the genius didn't have the housing back on properly, so there was about a 1/4 in gap in the back, which I am assuming helped my throttle plate grow itself a nice black ring around the edges...
a little throttle body cleaner and an old toothbrush later, it's running right again.
Thanks for the suggestion.
now my second question is why in gods name does my elantra blow headlights like that's its job? (no moisture, etc... it just seems to burn one out like clockwork about every 6 months)--- i've heard that my problem is not uncommon...just wondering if there was an easy fix...
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
snipped-for-privacy@gmail.com wrote:

The stock bulbs are not very durable and neither are standard replacement bulbs. I'm using Silverstars currently (ordered from an Ebay store for $25/pair) and they last a year or more. When my old Excel burned out bulbs regularly, I switched to PIAA bulbs that cost me ~$75/pair locally, but are probably available for less online. They lasted for several years and I eventually took them out before I sold the car. Unfortunately, they don't fit my Elantra. When my current set of Silverstars burns out, I'll be installing PIAA bulbs.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Belated thanks, been swamped with work... I almost sprung for silverstars, but I went with the mid grad sylvania bulbs instead... I'll go for the silver stars on my next (and sure to be soon) burn out.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

Motorsforum.com is a website by car enthusiasts for car enthusiasts. It is not affiliated with any of the car or spare part manufacturers or car dealers discussed here. All logos and trade names are the property of their respective owners.