I changed it to return a string instead of char* due to usage of std::string::c_str() to return from get_state_name() in Monitor.h. 

The problem with c_str() is that the result gets (may) invalid after the related string object gets destroyed or out of scope (which should be true on return). So you may get garbage in this case.