Lot of small fixes