Remove dead variable assignments
Minor refactoring