Working to make the code more clear
Modularizing code