Update ofMain.h

integrating bakercp's proposal