Corrected logical, grammar, and spelling mistakes