Added some comments in the main.cpp to make it easier to understand and fixed the postion of some stuff