Add partials and refactoring