Correction de qques bug + cleaner code