Added lots of comments to main.cpp