Update main.cpp

Added a comment explaining every line for an easier editing experience