Refactoring for allowing switch between customView and default views.