Added comments in mainc. Deleted some unused function in mainh and mainc.