Change collections to be objects instead of arrays