Photon management in nanostructured solar cells