Initial commit of minimally modified fitter from Matt