Refactor header and integration