Make header building more flexible