refactor views and partials