move settings out of code, into LocalSettings. Fix curl errno.