Changes to fitting and plotting. In a nice place here