libfoundation: Further work on records API.