Refactored object handling