Added some regions and comments to main.cpp to make it a little easier to read and navigate