Refactor router and views using partials