Python QofInstance improvements