Lots of minor improvements here and there