Adding tests and limiting CM mode to python 3.