Structure update

Updated variable names, function names and a better C++ coding style