Minor cleaning ('S-curve' fit currently not working)