Factor out headers into a command \makeheadfoot