Cleaned up header to have better casting and spectral conventions.