Revamp of fit function to make it more compact; works on Barretina data, but not yet stress-tested for the ALL data