ENH: Refactor view