Refactor the way we handle headers