refactor view creation into a class