Add cmake build file.
Refactor the python code.