How to Build Ethical AI that Protects Rights and Prevents Harm