CPU FFT selects grid dimensions that can be handled efficiently.  Also lots of minor cleanup.