refactored layouts and partials