Stripped a lot from the lightcone selection, got the rotation/shuffling etc. in a separate function, and in general it is a bit of a mess now...