Records integration

Same commit as before, just resolved the conflicts.