extracting a bit more header stuff into a shared file