Made some modifications to the CMakeLists.txt files and added build.sh.  Fixed testsim.c as well.
Minor changes to Main.c