Add cfanim to the CMake build
Use std::string to simplify code
Fix signed/unsigned comparisons, fix potential division by 0
Squash unused parameter warning
Use provided buffer size
Clean unused variables and parameters
Remove unused variable
Comment out unused parameter