rhogen: change field accessors, correct returning of objects