Foundations of Electromagnetic Theory