Minor convention changes and spelling corrections.
Minor refactor.