The rewrite to C++ its working as the C version did. Code ready to be cleaned up.