P0301 is the number 1 cylinder is miss firing change the spark plug and coil in that cylinder to another cylinder erase the codes drive the car see if the mis-fire changes to the cylinder you have moved the suspect parts too if so you may have a bad coil or plug,
P1399 is a random mis fire code, I have had to take of the intake manifold ans carefully clean the EGR ports to clear this code.
I switched the coil packs around and replaced the plugs with the same codes keep coming up. When you say EGR ports are you talking below the EGR valve or the ports in it? I have put a new EGR valve on.