bootstrap and improved fitting changes

This should be the version that works with bootstrap error analysis