Updated code to ahome-titanium API