Test of lambda promotion, lots of small fixes