Start work on web API
Wrong error
Various fixes; add ranks
Ugly scripts