refactoring partials and templates out