Implementing AI in Critical Systems