A variety of small fixes