Added _obj/_ptr methods to the BaseEntity class.