Refactor header from rest