Re-structuration du code principal