Update the object var creation to use a getter.