Added functions header file
g++ related fixes
Cleanup, reformat
Cleanup
g++ fix