Add a connexion class (instead of global variables)