refactor(header): scope variables