Updated the code to handle missing data, and use the new objects.