Fix c++ indentation and style

fix a lot of problems with indentation and style.  The code uses a uniform style now