libslpp: Cleanup code and handle C/C++/shell scripts with the same code