Fixed: various typos. Refactoring.