removes duplicate local declarations