Fix misspelled variable and style cleanup