Fix unittest.
Fix constant smoothing algorithm.
Automatic Py3k merge for testing