Improve Space API output and headers

[ Headers ]

* Content-Type: application/json
* Access-Control-Allow-Origin: *
* Cache-Control: max-age=120, must-revalidate

[ Other changes ]

* Pretty prints JSON output, so it's more easily readable by humans
* Removes final ?>