API pretty much working now