Simplified some try catching.