Restructured project and added c++ version.