refactor layout into partials