A bunch of minor fixes and typos