Minor code refactoring. Header is now cached.