And thus begins the painful journey of porting this to CPP cause clearly non OO is just not working for me