Text this: Origin of vertical orientation in two-dimensional metal halide perovskites and its effect on photovoltaic performance