Add doc and fix a few typos.