Refactor header and sidebar into partials