small tidy-up

added helper functions getRetVal() and Registration(Record r)