Gas and electric water heaters