Adding first drafts of functions initG, checkConcav, and mainFun