Updates to build.sh
Formatting, build, and include guard fixes
Removed unnecessary dynamic memory allocations with mem leaks
Fix compiler warnings
Removed use of malloc/free
Updated interface to prevent unnecessary copies and memory leaks
Updated SWIG file
Updated and cleaned up tests