Initial commit, a C++ implementation