View factory refactored