Reorganisation of the code in several files and functions
Reorganisation of the code in several files and functions