Improved loading and error catching.