continue replacing `const char*` with `const std::string&`

This patch includes:

* Continue replacing `const char*` with `const std::string&`  where it makes sense.
* It also removes some Hungarian notation from the code.
* It fixes some indentation issues in part of the code
* It replaces `int` or `unsigned int` with `long` where it makes sense.