Fix a lot of flaws and typos.