Move settings into more sensible ordering
Move exception handler out of main view
Use view.settings for API settings, to make testing easier.