Code changes according to API changes