Heating and hot water systems in buildings