Energy, work and heat