Convert records to structs

This is just a conversion for internal records. Doc generation for records is still there.