Another bunch of minor fixes