Understanding the degradation of perovskite solar cells and engineering methods for improved stability