Update header
Add least squares fit method and unit test