Improve the performances
Improve the performances and clean the code