Corrected some missing statements and typos