Fixed a threading issue in the smearing coefficient calculation. Fixed syntactic errors and code now compiles.