Understanding and harnessing the potential of layered perovskite-based absorbers for solar cells