- more code cleanup based on cppcheck results and valgrind
- added -h option to build-mg.sh to show parameter usage.