A bunch of minor improvements