Added random array, caching, and exposed both odd and even spectra.