Changed way objects are made in both controllersto adjust to API