Added support for std::string. Code clean-up.