Optimizing Perovskites for the Water-Splitting Reaction