Major rewrite of records2df