If you are doing your own valve covers you are probably a pretty adept DIY, but mainly for the NOOBS out there I will reiterate BMW battery care.
BATTERY DISCONNECTION
Gently loosen the NEGATIVE terminal on the battery. Make sure it is loose enough that you can easily remove the negative terminal clamp from the negative battery post. The negative battery cable has a sensor system integrated into it known as the IBS or intelligent battery sensor that monitors incoming and outgoing charge as well as battery temperature. It is very expensive, so handle it gently and DO NOT pry the battery cable clamp up and off the battery post with a screw driver, which can easily damage the IBS. Once the cable is off, carefully insulate the clamp terminal with a rag or other insulating item and secure with a tie wrap or rubber band.
Then gently loosen the POSITIVE terminal on the battery. Again, make sure it is loose enough to easily remove the positive terminal clamp from the positive battery post. The positive battery cable has the BST or battery safety terminal integrated into it. The BST contains an explosive charge which is set off during an accident, disconnecting a portion of the car's power (mainly to the engine to prevent under-hood fires due to ruptured gasoline lines). Power to the communications system and interior lights are maintained on a different power line. The BST is expensive and can be damaged with rough handling, so DO NOT pry the clamp off the terminal. Once the cable is off, carefully insulate it to insure it does not fall back and touch the positive terminal of the battery, which would reenergize the power system.
When work is completed, replace the positive battery terminal first and tighten it down, then replace and tighten the negative battery cable.
After reconnecting the battery you will need to reset your clock. Your active steering system may also throw an error. After starting the car turn the steering wheel all the way to the right to lock, then rotate the steering wheel all the way to the left to lock, then go on a short drive and the error should clear.