Completed the discrete trig least squares module.