Move view-related code to View class. Also, closes #8