Fixed some errors in the doc including typos.
Fixed some dreadful errors and added some more text.