Fixed remaining broken references and updated deprecated Python constructs.