fix smoothing and some refactoring typos
add space example