A tonne of changes, the bigs ones are
- error handling under control
- accept JSON for all endpoints