support get_settings. some cleanup. some improved error handling