Better organize the code