Start reorganizing the code