Fix small mistakes and use both polynomial and fourier series.