Lots off small fixes