Fix up some API stuff and JSON formatting
Lots of stuff