Cleaned settings.js

There were some redundant blocks of code in settings.js, I removed quite a bit but had to leave some in there for the sake of keeping the callback passed to `checkApiEndpoint` synchronous to the end of the API checks.

Only potential pain point in the cleaning is the if statement inside `checkApiEndpoint`, I've checked it over a few times for accuracy but the more eyes the better.

Apologies for the whitespace changes, Atom deletes extra whitespace.