Refactor view components