Weightings Extension &  Porting to C++.