Refactored view into class.