The Mathematical Structure of Quantum Field Theories