Implements HTTP JSON API server
Adds official solution
Moves API endpoints into their own methods