Move some things out of loops, remove creation of unused etas and omegas

This change did not reduce a single clear bottleneck, but reduced
the time of the test analysis from 178.2 to 150.2.