Refactor by using View Class