Minor refactoring; correct spelling