So you had problems with the earths under the battery tray?
Is the engine speed sensor the knock sensor? If it is then it may relate to the 2 misfires I had recently. I put tesco's 99 octane fuel in there and on two different occasions when suddenly flooring it, the car just bogs completely as if no spark was present. If I reapply throttle then it will pull away nicely. I'll clean up them earths tomorrow, I am having problems with the wiring system in the car, and both of the knock sensors are pretty oily, one of them has crap wiring AFTER the plug, on the engine loom side.