Merge pull request #493 from ndawe/master

[MRG] new fit_workspace function and improved minimize