added api url, fixed some glaring errors