Move var into smaller scope