Refernces updated and bug corrrections in api