enabled a few other warning options of g++ and changed the code so that it does not emit warnings when compiled