A bunch of minor fixes and typos

if it's `x` above, it should be `x` here too