Added all at once smoothing into the main functions, rearranged a few things, tidied up a bit of code, and changed main functions to record smoothing time