Map smoothing number to enum value with a table; reject numbers out of range
Whitespace tweaks
comment tweaks
Improve parameter errors for lm weight
Document "lm" as a valid "weighting"