Some doc typos fixed and cut some long code lines