Handle API and server errors more gracefully, improve maintainability of codebase, bug fixes 8622a0e xarical commited on Apr 3