Fixup includes.
fix narrowing conversion in {} warnings
Beautify and consistencify file headers.
fix globaldirname conflict and fix fftw error
fix conflict