corrected few spellings and added comments to few section of code