Nissan Repair Questions? Ask a Mechanic for Answers ASAP
I would start with the timing. I do not see a lot of issues in general with this engine, in fact the most common is broken timing belts, bad distributors and sometimes leaking intake manifold gaskets.
Setting the timing right will likely help with the running quite a bit. Make sure the tapping isn't a plug wire arcing and snapping. If it is misfiring it could be the problem. At least now that it will idle on it's own you can set up the timing and go from there.