Improve header class helper to remove duplication