This was already supporting multiple objects, but I changed it to use the API we are using elsewhere.