Separate all pieces of code into functionnal parts