Cleaned up C++ implementation.
Removed python implementation.