Refactored object creation