Code improvement and typos.