Modified code into libtoxdata