Small refactor on view creation.