Refactored visual factory