Small fixes to comply with C++ best practices

Small fixes to comply with C++ best practices
Merge pull request #3706 from ricardoquesada/cpp_best_practices

Small fixes to comply with C++ best practices