Fix spelling errors & reformat code.