Minor refactoring, removed unnecessary variable.