Fix some issues in Model M datasets and in data management code.