Refactor view and other view page