Code fixes

Various code fixes, mostly discovered by MSVC code static analyzer .
This will cause more problems down the line by the looks (see copy constructor).  I dunno if m_text is NULL checked on every use.  If it's not, there's really no point checking it here either.

I presume @elupus had a reason not to use std::string here.