Work, heat and internal energy