Factory model for objects.