some work done on the C++ port

Signed-off-by: DarkSnake-Kobra <jbttoms@gmail.com>