fix 2d fits, add parameter boundaries
several bugfixes, tweaks, cleanups