Moved deprecated code towards C++11