Split the code in three different modules