Refactor: Localize variable