Refactoring view creation.