Refactor layout with partials