Added docs and fixed typos.