Hi, I am a professional certified mechanic, with an engineering background, and 35+ years experience. I will do my best to assist you. Also keep in mind I don't know if you are a pro or a novice, so feel free to add any additional info at any time.
Code 1312 is deep, and not well understood. The 1312 code triggers when the ion sensing ignition module has problems, or has perceived problems. This setup is used on the Delphi "ion sensing" ignition system where the spark plugs are used as a sensor (when they are not firing) to measure the electrical resistance of the gasses in the combustion chamber. This allows the computer to know the ion content of the combustion chamber gasses, and fine tune the ignition, and fuel system. So that is the 1312 code.
As far as the wont accelerate, I have been around engines a lot, and the first thing that comes to mind is the possibility of the cam timing be off. Many times after work like this something happens to the cam timing, and the person who has worked on it is sure the timing cant possibly be the problem. Still even if you are sure, you need to check the cam timing again. A quick check is to do a compression test. If the cam timing is off, the compression will be low. That is where I would start, from there you will need to get into the electronic engine controls to solve the problem. Go over all of this and if you have any more questions at all, I am here to help. Good luck with it, have a great day, and Thanks for using Just Answer.
I do not get paid for my work unless you rate at 3 to 5 Smiley Faces or Stars, a bonus is always greatly appreciated. If the answer is not clear, let me know what additional help you need, and I will be happy to assist you further.