Refactor TestView