Hyundai Repair: random misfires, crank sensor, hyundai accent


Question
i replaced the crank sensor because when i drove down the road, my cars engine would stop running, after a few minutes of waiting it would start up again, it only occur when the temperature of the coolant got up to optimal running temp. i used my OBI reader and everytime it came up code p0335, so i replaced it. it hasnt died on me since. when i took the old sensor out it had a little rust on the metal part of the sensor. otherwise no real damage to the sensor

also my obd reader signals that my emissions is at yellow, if that might help any.
-------------------------------------------
The text above is a follow-up to ...

-----Question-----
i really dont have a performance issue, i still get good accelsration when i drive normally, i dont even feel the engine tugging when i do drive
-------------------------------------------
The text above is a follow-up to ...

-----Question-----
i have been having trouble with my 98 hyundai accent,
 the check engine light comes on
when i go over 3500 rpms and the codes are p0300 p0301,p0302,
p0303 p0304, i have replaced my crank sensor recently from a previous problem. and i also replaced the ignition coil, plugs and plug wires. all are new and i still get the misfires, can you help me try to figure out what else might need replacing. also i live in canada where i bought my car
-----Answer-----
I'd primarily suspect something that might affect the fuel delivery to all cylinders, such as low pressure from the fuel pump.  Do you have a performance issue along with the check engine lamp?
-----Answer-----
If you're not noticing any lack of performance at all, then I might suspect a partially restricted catalytic converter, or false misfire codes.  All of these situations are rare.

First, I'd like to know why the crank sensor was replaced.  Also, if you can, tell me if there was any physical damage to the crank sensor.

It's possible that either the crank sensor or the sensor wheel on the crankshaft is just a little loose, causing the computer to perceive a misfire when none exists.

It's also possible that the chassis acceleration sensor (the sensor mounted on top of one of the front strut towers) isn't working properly.  When this occurs, though, a code for the sensor itself usually sets.  

Answer
The things you report about the crank sensor lead me to believe the crank sensor is functioning normally at this time, unless it's loose in the block.  

I don't know what "emissions at yellow" would indicate.  You may need to read your code-reader manual to see what that means.

If you cannot find a problem with the installation of the crank sensor, you may need to have this professionally diagnosed.  You'll want to use a *very good* driveability shop.  You should also expect that the diagnosis isn't likely to be simple and may cost a significant amount of money.