To code

Refactor to use C++.