Refactor view into separate module.