Fixed AskOnClose feature and moves creation of toxInterface to cpp file.