Support for records
Oops
Correct record self rule generation
Improve record self rule generation