Correcting a handful bugs, still a few fonctions to test, everything seems correct
The main code is implemented, all is left to do is debbuging and documenting