Refactoring for wrappers.
Headers logic moved into classes.