These developments led to the theory of conservation of energy, formalized largely by William Thomson (Lord Kelvin) as the field of thermodynamics. Who largely formalized the developments that led to the theory of conservation of energy?