Big changes for power spectrum estimate.

Passed the whole test.