Hmmmmm...P1638 makes me wanna think about the alternator. I would check and make sure your wires and connectors to the alternator are good.

Secondly, fueling might be an issue, but the P0300 is so general. It could be anything from bad plug or wire, 02 sensor, faulty coil pack, faulty fuel injector, dirty fuel filter, etc. I would start with the cheap/easy things first (no, not Devin's mom) and go from there.