Settings file should be an example, and API.php cleanup

This will make sure we don't overwrite settings when upgrading.

Also API.php will now give a proper bad response code if it is a bad request.